<template>
  <div>
    <div>
      <label for="username">用户名</label>
      <input id="username" v-model="username">
    </div>
    <div>
      <label for="pwd">密码</label>
      <input id="pwd" v-model="pwd">
    </div>
    <button @click="submitHandler">提交</button>
  </div>
</template>

<script>
  import Demo from '../components/Demo.vue'
  export default {
    data(){
      return {
        username: 'username',
        pwd: 'pwd'
      }
    },
    methods: {
      submitHandler: function (){
        console.log(this.username)
      }
    },
    components: {
      Demo
    },
  }
</script>
